package com.athuahua.spzx.controller;

import com.athuahua.spzx.service.SmsService;
import com.athuahua.spzx.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: huahua
 * @Date: 2024/8/13 0013
 * @Time: 15:27
 * @Description:
 */
@RestController
@RequestMapping("api/user/sms")
@Slf4j
@Tag(name = "短信模块")
public class SmsController {
    @Resource
    private SmsService smsService;


    /**
     * 调用线程给用户发送验证码
     * @param phone
     * @return
     */
    @GetMapping("sendCode/{phone}")
    public Result sendCode(@PathVariable("phone") String phone){
        smsService.sendCode(phone);
        return Result.success();
    }







}
